package util;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;

import vo.ParkInfo;

public class FileIOHelper {


	public void writeFile(String fileName, Object obj) throws IOException {
		
		// TODO Object 형식으로 파일에 씀.
		ObjectOutputStream oos = new ObjectOutputStream(new
				BufferedOutputStream(new FileOutputStream(fileName)));
		
		oos.writeObject((ParkInfo)obj);
		oos.flush();
		oos.close();
	}
	
	public String readFile(String fileName) throws FileNotFoundException, IOException {
	
		ObjectInputStream ois = new ObjectInputStream(
				new BufferedInputStream(new FileInputStream(fileName)));
		
		
		
		ois.close();		
				
		return fileName;
		
	}
	
	
}
